package com.oasys.controller;

import com.oasys.annotations.RequiredToken;
import com.oasys.utils.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: TODO 测试docker
 * @Author: mis_wu
 * @Date: 2023/9/20
 * @Company OA
 **/
@RestController
@RequestMapping("/oa/test")
@Slf4j
public class TestDockerController {

    @GetMapping("/testProduct01")
    @RequiredToken
    public ResponseResult<String> testProduct01(){
        log.info("execute testProduct01 >>>>>>>>>>>>>>>>>>");

        ResponseResult<String> result = new ResponseResult<>();
        result.setCode(200);
        result.setMsg("请求成功");
        result.setData("hello, welcome to oa sys,docker 部署成功");

        return result;
    }

    @GetMapping("/testProduct02")
    @RequiredToken
    public ResponseResult<String> testProduct02(String name){
        log.info("execute testProduct02 >>>>>>>>>>>>>>>>>>{}",name);

        ResponseResult<String> result = new ResponseResult<>();
        result.setCode(200);
        result.setMsg("请求成功");
        result.setData("hello,"+ name +", welcome to oa sys,docker 部署成功");

        return result;
    }
}
